package models.repository.common;

import models.entities.PaginatedList;
import models.entities.UserEntity;
import models.entities.UserInformation;
import models.exceptions.*;
import play.mvc.Scope;

import java.io.IOException;
import java.util.List;
@Deprecated
public interface UserRepository {
    boolean validate(String username, String password) throws GetEntityException, IOException;

    void register(UserEntity user) throws CreateEntityException, UserExistsException, IOException;

    UserEntity getUser(String email) throws GetEntityException, IOException;

    UserEntity getAnonymousUser(String sessionId) throws CreateEntityException, IOException;

    void mergeShoppingCarts(String userName, Scope.Session session) throws UpdateEntityException, CreateEntityException, GetEntityException, IOException;

    void update(UserEntity user, UserEntity updatedUser) throws UpdateEntityException, IOException;

    boolean changePassword(String oldPassword, String newPassword, String username) throws UpdateEntityException, IOException;

    PaginatedList<UserEntity> getUserList(int pageNumber, int pageSize) throws GetEntityException, IOException;

    void delete(int id) throws DeleteEntityException, IOException;

    UserEntity getUser(int id) throws GetEntityException, IOException;

    UserInformation getUserInfo(int id) throws GetEntityException, IOException;

    void edit(UserEntity user);

    void setIsAdmin(int id, boolean isAdmin) throws UpdateEntityException, IOException;

    List<String> getAdminEmails() throws GetEntityListException, IOException;

    void mergeShoppingCarts(int currentUserId, int anonymousUserId) throws UpdateEntityException, IOException;

    Boolean validate(UserEntity userEntity) throws GetEntityException, IOException;
}
